package com.example.yoga.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author liwenkai
 * @since 2021-03-11
 */
@TableName("card_course")
public class CardCourse extends Model<CardCourse> {

    private static final long serialVersionUID = 1L;

    /**
     * 卡id
     */
    @TableField("cardId")
    private Integer cardid;

    /**
     * 课程id
     */
    @TableField("courseId")
    private Integer courseid;

    /**
     * 购买时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")
    @TableField("buyDate")
    private Date buydate;


    public Integer getCardid() {
        return cardid;
    }

    public void setCardid(Integer cardid) {
        this.cardid = cardid;
    }

    public Integer getCourseid() {
        return courseid;
    }

    public void setCourseid(Integer courseid) {
        this.courseid = courseid;
    }

    public Date getBuydate() {
        return buydate;
    }

    public void setBuydate(Date buydate) {
        this.buydate = buydate;
    }

    @Override
    protected Serializable pkVal() {
        return null;
    }

    @Override
    public String toString() {
        return "CardCourse{" +
        "cardid=" + cardid +
        ", courseid=" + courseid +
        ", buydate=" + buydate +
        "}";
    }
}
